package com.ehe.common.core.web.pojo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.ToString;

/**
 * 主键为string型的实体
 * @author jerry
 */
@Getter
@ToString(callSuper = true)
@KeySequence(clazz = String.class)
public abstract class StringSuperEntity<T> extends SuperEntity<T, String> {

    /** 主键 */
    @ApiModelProperty(value = "主键", position = 1)
    @TableId(type = IdType.UUID)
    private String id;

    @Override
    public T setId(String id) {
        this.id = id;
        return (T) this;
    }
}
